<%--
  Created by IntelliJ IDEA.
  User: 泠雨落兰亭
  Date: 2021/9/26
  Time: 0:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>求职者个人中心</title>
    <link rel="icon" href="/hire/imgs/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/hire/css/common/nav_left.css">
    <link rel="stylesheet" href="/hire/css/user/center/employee_info.css">
<%--    <link rel="stylesheet" href="/hire/plugins/bootstrap/css/bootstrap.min.css">--%>
    <style>

    </style>
</head>

<body>
<%@include file="../../common/mynav.jsp" %>
<div class="middler">
    <div class="inner">
        <div class="left">
            <div class="menu-list">
                <ul class="menu">
                    <li class="active"><a href="/hire/user/employee_info">个人中心</a></li>
                    <li><a href="/hire/user/resume_center">简历中心</a></li>
                    <li><a href="/hire/user/resume_view">谁看过我</a></li>
                    <li><a href="/hire/user/mydelivery">我的投递</a></li>
                    <li><a href="/hire/user/mycollection">我的收藏</a></li>
                    <li><a href="/hire/user/myblacklist">我的屏蔽</a></li>
                    <li><a href="/hire/user/account_settings">账号设置</a></li>
                </ul>
            </div>
        </div>

        <div class="right">
            <div class="my">
                <div class="myinfo">
                    <div class="person">
                        <img src="/hire/imgs/user/avatar/${employee.avatarImg}" alt="">
                        <span>${employee.name}</span>
                        <span>${user.phone}</span>
                    </div>
                    <div class="mys">
                        <a href="/hire/user/resume_view">
                            <span class="number">${count}</span>
                            <span>谁看过我</span>
                        </a>
                        <a href="/hire/user/mydelivery">
                            <span class="number">${deliveryCount}</span>
                            <span>我的投递</span>
                        </a>
                    </div>
                </div>
                <div class="myresume">
                    <div class="box-top">
                        <div class="top">
                            <div class="left">
                                <a href="/hire/resume/resume_preview?resumeId=${resumeNew.resume.id}">最近简历</a>
<%--                                <a href="/hire/resume/resume_make?resumeId=${resumeNew.resume.id}" class="edit">编辑</a>--%>
                            </div>
                            <div class="right">
                                <button type="button" onclick="updateTime()">刷新</button>
                            </div>
                        </div>
                        <div class="bottom">
                            <div class="left">
                                <span>${resumeNew.privacy1}</span>
                            </div>
                            <div class="right">
                                <span class="curtime" id="rig"><fmt:formatDate
                                        value="${resumeNew.resume.updateTime}"
                                        pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </div>
                        </div>
                    </div>
                    <div class="box-bottom">
                        <a href="/hire/resume/resume_make?resumeId=${resumeNew.resume.id}">简历编辑</a>
                        <a href="javascript:privacyChange(${resumeNew.resume.id});" id="privacy">公开简历</a>
                        <a href="/hire/resume/resume_upload">上传附件</a>
                    </div>
                </div>
            </div>
            <div class="readme">
                <div class="title">
                    <h2>谁看过我</h2>
                    <span>（近60天你的简历被查看次，共计被${count}家公司查看）</span>
                    <a href="/hire/user/resume_view">更多</a>
                </div>
                <div class="info">
                    <ul>
                        <div class="container-fluid">
                            <div class="row">
                                <c:forEach items="${resumeViewList}" var="resumeView">
                                    <div class="col-md-12">
                                        <div class="thumbnail">
                                            <div class="caption" style="line-height: 35px">
                                                <li>
                                                    <div class="content">
                                                        <div class="left">
                                                            <a href="/hire/job/company/companyinfo?id=${resumeView.company.id}">${resumeView.resumeView.companyName}</a>
                                                            <div class="label">
                                                                <span>${resumeView.company.industryType}</span>
                                                                <span class="vline"></span>
                                                                <span>${resumeView.company.num}</span>
                                                            </div>
                                                        </div>
                                                        <div class="right">
                                                            <div class="up">
                                                                <span>总计看我</span>
                                                                <span class="number">${resumeView.resumeView.count}</span>
                                                                <span>次</span>
                                                                <a href="/hire/job/company/companyinfo?id=${resumeView.company.id}"><button data-method="f1" class="layui-btn c" onclick="ff()">查看详情</button></a>

                                                            </div>
                                                            <div class="down">
                                                                <span>最后一次查看&nbsp;&nbsp;</span>
                                                                <span class="curtime"><fmt:formatDate
                                                                        value="${resumeView.resumeView.viewTime}"
                                                                        pattern="yyyy-MM-dd HH:mm:ss"/></span>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </li>
                                            </div>
                                        </div>
                                    </div>
                                </c:forEach>
                            </div>
                        </div>
                    </ul>
                    <div class="last">
                        ...
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%--<%@include file="state_modal.jsp" %>--%>
<%@include file="../../common/myfooter.jsp" %>
<script>
    function updateTime() {
        $.post("/hire/user/update/userInfo",function (res) {
            // let time = new Date();
            if (res.code=='200') {
                location.reload();
                layer.msg("更新成功")
            }
            else
                layer.msg("更新失败")
        })
    }

    window.onload=function(){
        if (1==${resumeNew.resume.privacy}){
            $("#privacy").text("隐藏简历");
        }else {
            $("#privacy").text("公开简历");
        }
    }

    function privacyChange(id) {
        $.post("/hire/user/update/privacy",{resumeId:id},function (res) {
            if (res.code=='200') {
                location.reload();
                layer.msg("更新成功")
            }
            else
                layer.msg("更新失败")
        })
    }
</script>
</body>

</html>